from datetime import  datetime
file="file.txt"
with open(file,"r") as f:
    for line in f.readlines():
        line=str(line)
        myData=line.split(",")
        # print(myData)
        myDate=myData[0].strip()
        myprice = myData[1].strip()
        print(len(myData))
        # print(price)
        dt=datetime.strptime(myDate,"%Y/%m/%d")
        datetime.strptime()
        # # print(dt)
        price=float(myprice)
        # # print(dt)
        # # print(price)
        print("时间是：",str(dt.date()),",销售额是："+str(price))
        #











# from datetime import datetime
# file = "file.txt"
# with open(file, 'r') as f:
#     for line in f.readlines(): 
#         myDate, price = line.split(',')  
#         dt = datetime.strptime(myDate, '%Y/%m/%d')
#         price = float(price)
#         print("时间：",str(dt.date()) + ": 销售额：" + str(price))



# # from datetime import datetime
# # file = "file.txt"
# # myDict=dict()
# # with open(file, 'r') as f:
# #     for line in f.readlines(): 
# #         myDate, price = line.split(',')  
# #         dt = datetime.strptime(myDate, '%Y/%m/%d')
# #         price = float(price)
# #         print("时间：",str(dt.date()) + ": 销售额：" + str(price))
# #         myDict[dt] = price
# # print(myDict)